<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">
        <div class="tongbox tongbox5">
            <div class="tuo">
                <div class="tit">项目名称</div>
                <div class="con" id="tong_name"></div>
            </div>
            <div class="tuo">
                <div class="tit">建设单位</div>
                <div class="con" id="tong_jian_unit"></div>
            </div>
            <div class="tuo">
                <div class="tit">项目属性</div>
                <div class="con" id="tong_business_name"></div>
            </div>
            <div class="tuo">
                <div class="tit">工程造价(万元)</div>
                <div class="con" id="tong_expectfee"></div>
            </div>
            <div class="tuo">
                <div class="tit">施工合同金额(元)</div>
                <div class="con colorlan" id="tong_shi_money"></div>
            </div>
        </div>

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">项目名称</td><td class="tv" id="name"></td><td class="tt">项目编号</td><td class="tv" id="number"></td></tr>

                <tr><td class="tt">项目属性</td><td class="tv" id="business_name"></td><td class="tt">项目类型</td><td class="tv" id="engintype"></td></tr>
                <tr id="lian_unitdiv" class="layui-hide"><td class="tt">联营方</td><td class="tv" id="lian_unit" colspan="3"></td></tr>
                <tr><td class="tt">建设单位</td><td class="tv" id="jian_unit"></td><td class="tt">所属单位</td><td class="tv" id="chanid_name"></td></tr>
                <tr><td class="tt">所在地</td><td class="tv" id="areas"></td><td class="tt">详细地址</td><td class="tv" id="addr"></td></tr>
                <tr><td class="tt">工程造价(万元)</td><td class="tv" id="expectfee"></td><td class="tt">工期(天)</td><td class="tv" id="duration"></td></tr>
                <tr><td class="tt">计划开工日期</td><td class="tv" id="startdt"></td><td class="tt">计划竣工日期</td><td class="tv" id="enddt"></td></tr>
                <tr><td class="tt">招标方式</td><td class="tv" id="zhaotype"></td><td class="tt">项目状态</td><td class="tv" id="state_name"></td></tr>
                <tr><td class="tt">项目负责人</td><td class="tv" id="man_xiang_name" colspan="3"></td></tr>
                <tr id="actualdtDiv" class="layui-hide"><td class="tt">实际开工日期</td><td class="tv" id="actualdt" colspan="3"></td></tr>
                <tr id="filishdtDiv" class="layui-hide"><td class="tt">竣工验收日期</td><td class="tv" id="filishdt" colspan="3"></td></tr>

                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>


        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_engin_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;

                $("#tong_name").text(data.name);
                $("#tong_jian_unit").text(data.jian_unit);
                $("#tong_business_name").text(data.business_name);
                $("#tong_expectfee").text(parseFormatNum(data.expectfee, 6));
                $("#tong_shi_money").text(parseFormatNum(data.shi_money)).click(function () {
                    if(res.data.shiinfo){
                        openPage('../contract_shi/show.php?id='+res.data.shiinfo.id, '80%', '80%');
                    }
                });

                $("#name").text(data.name);
                $("#number").text(data.number);
                $("#business_name").text(data.business_name);
                if(data.business == 2){
                    $("#lian_unitdiv").removeClass('layui-hide');
                    $("#lian_unit").text(data.lian_unit);
                }
                $("#engintype").text(data.engintype);
                $("#jian_unit").text(data.jian_unit);
                $("#chanid_name").text(data.chanid_name);
                $("#areas").text(data.areas);
                $("#addr").text(data.addr);
                $("#expectfee").text(data.expectfee);
                $("#duration").text(data.duration);
                $("#startdt").text(data.startdt);
                $("#enddt").text(data.enddt);
                $("#man_xiang_name").text(data.man_xiang_name);
                $("#state_name").text(data.state_name);
                $("#zhaotype").text(data.zhaotype);
                $("#actualdt").text(data.actualdt);
                $("#filishdt").text(data.filishdt);
                $("#explain").text(data.explain);

                if(data.state == 3){
                    $("#actualdtDiv").removeClass('layui-hide');
                }
                if(data.state == 6){
                    $("#actualdtDiv").removeClass('layui-hide');
                    $("#filishdtDiv").removeClass('layui-hide');
                }




                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('engin', param_id);
    });



</script>
</body>
</html>




